const express = require('express')
const app = express()
const router = require('./router')

//处理跨域
const cors = require('cors')
app.use(cors())
// 处理post请求
app.use(express.json())
app.use(express.urlencoded())

//挂载路由
app.use('/api',router)

app.listen(3000,()=>{
    console.log('3000 running')
})